<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>项目对齐方式</title>
    <style>
        .box {
            width: 500px;
            height: 500px;
            border: 2px solid black;
            margin: 100px auto;
            display: flex; /*显示为弹性盒子*/
            flex-wrap: wrap;
        }

        .box div {
            width: 100px;
            height: 100px;
            border: 1px dashed red;
            box-sizing: border-box;
        }

        .div1 {
            align-self: flex-start;
        }

        .div2 {
            align-self: flex-end;
        }

        .div3 {
            align-self: center;
        }

        .div4 {
            align-self: baseline;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="div1">1111</div>
    <div class="div2">2222</div>
    <div class="div3">3333</div>
    <div class="div4">4444</div>
    <div class="div5">5555</div>
</div>
</body>
</html>